//
// GNS_RankLayer.h
// GameHall
//
// Created by 梁晓强 on 16/2/12.
//
//

#ifndef __GameHall__GNS_RankLayer__
#define __GameHall__GNS_RankLayer__

#include "cocos2d.h"
#include "cocostudio/CocoStudio.h"
#include "ui/CocosGUI.h"
#include "GNS_YJFLayer.h"
USING_NS_CC;
using namespace cocostudio::timeline;
using namespace ui;
using namespace std;

class GNS_RankLayer : public GNS_YJFLayer
{
public:
    GNS_RankLayer();
    ~GNS_RankLayer();
    static GNS_RankLayer* createLayer();
    virtual bool init();
    CREATE_FUNC(GNS_RankLayer);
    void BtnCallBack(Ref *pSender , ui::Widget::TouchEventType type);
    void SetNodeName(std::string CsbName);
	void ShowRankList(bool isShow);
	void createItem(long long  gold, const char * name, long long  rank, const char * time, long long headId, long long userId); //创建列表选项
	void setButtonState();
private:
	ListView* m_RankListView = nullptr;
	int m_GameId = 10;//默认是放炮罚
	int m_RankType = 1;  //默认是日排行

	Button * m_btnGame1 = nullptr;
	Button * m_btnGame2 = nullptr;
	Button * m_btnRankByDay = nullptr;
	Button * m_btnRankByMonth = nullptr;
	Button * m_btnRankByAll = nullptr;
};

#endif /* defined(__GameHall__GNS_RankLayer__) */